'REQUEST' '"Error when saving temporary image!"' '" OK "'
CALL ErrorOut 10
END
'RENDER_CLOSE' arg(1)
ADDRESS "DPAINT.1"
'SCREENTOFRONT'
'LOADPIC' '"'temp_file'"'
IF (RC ~= 0) THEN DO
ADDRESS 'IMAGEENGINEER'
'IE_TO_FRONT'
'REQUEST' '"Error when loading image into DPaint!"' '" OK "'
CALL ErrorOut 10
END
CALL Errorout 0
/* Errorout procedure */
ErrorOut:
PARSE ARG ExitCode
IF (EXISTS( TEMP_FILE )) THEN DO
ADDRESS COMMAND 'Delete >NIL:' temp_file
END
EXIT ExitCode
/* IE's error procedure */
Error:
address 'IMAGEENGINEER'
if RC=5 then do /* Did the user just cancel us? */
IE_TO_FRONT
LAST_ERROR
'REQUEST "'||RESULT||'"'
CALL ErrorOut 10
end
else do
IE_TO_FRONT
LAST_ERROR
'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'